#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5;
typedef long long LL;
inline LL read()
{
	LL x=0,f=1;char ch=getchar();
	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}
	while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
	return x*f;
}
int main(void)
{
  cin.tie(0);std::ios::sync_with_stdio(false);
  LL t;cin>>t;
  while(t--){
    LL n,k;cin>>n>>k;
    if(k==1){
        for(LL i=0;i<n;i++){
            if(i%3==0){
                cout<<"c";
            }
            else if(i%3==1){
                cout<<"b";
            }
            else if(i%3==2){
                cout<<"a";
            }
        }
    }
    else{
        LL sum=0;
        if(k<=n){
            for(LL i=1;i<=k;i++){
                cout<<"a";sum++;
            }
        }
        if(n-k>0){
            LL res=n-k;
            for(LL i=1;i<=min(k,res);i++){
                cout<<"b";sum++;
            }
        }
        if(n-2*k>0){
            LL res=n-2*k;
            for(LL i=1;i<=min(k,res);i++){
                cout<<"c";sum++;
            }
        }
        LL ans=n-sum;
        for(LL i=0;i<ans;i++){
            if(i%3==0){
                cout<<"a";
            }
            else if(i%3==1){
                cout<<"b";
            }
            else if(i%3==2){
                cout<<"c";
            }
        }
        /*
        LL ans=ceil(1.0*del/2);
        LL res=del-ans;
        if(del&1){
            for(LL i=1;i<=(del-1)/2;i++){
                cout<<"bc";
            }
            cout<<"b";
        }
        else{
            for(LL i=1;i<=del/2;i++){
                cout<<"bc";
            }
        }
        */
    }
    cout<<endl;
  }
return 0;
}
